<!DOCTYPE HTML>
<html
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:item="http://java.sun.com/jsf/composite/components/item">

    <ui:composition template="../templates/template.xhtml">
        <ui:param name="selectedMenuIndex" value="home" />
        <ui:define name="content">
            <h:form>
                <h:panelGroup layout="block" styleClass="home-main-title">
                    <h1><h:outputText value="#{msgs['home.content.title']}" /></h1>
                </h:panelGroup>
                <h:messages globalOnly="true" errorClass="errors" infoClass="success"/>
                <h:panelGroup layout="block" styleClass="home-articles">
                    <!-- Last 5 modified Items. -->
                    <h:panelGroup styleClass="articles-column articles-column-1 single-article" layout="block" >
                        <item:cmp-item-info backingBean="#{itemListBean.quickItems[0]}" styleClass="article-1" rendered="#{itemListBean.quickItems.size() > 0 }" />
                    </h:panelGroup>
                    <h:panelGroup styleClass="articles-column articles-column-2 middle-column two-articles" layout="block">
                        <item:cmp-item-info backingBean="#{itemListBean.quickItems[1]}" styleClass="article-2" rendered="#{itemListBean.quickItems.size() > 1 }"/>
                        <item:cmp-item-info backingBean="#{itemListBean.quickItems[2]}" styleClass="article-3" rendered="#{itemListBean.quickItems.size() > 2 }" />
                    </h:panelGroup>
                    <h:panelGroup styleClass="articles-column articles-column-3 two-articles" layout="block">
                        <item:cmp-item-info backingBean="#{itemListBean.quickItems[3]}" styleClass="article-4" rendered="#{itemListBean.quickItems.size() > 3 }" />
                        <item:cmp-item-info backingBean="#{itemListBean.quickItems[4]}" styleClass="article-5" rendered="#{itemListBean.quickItems.size() > 4 }" />
                    </h:panelGroup>
                </h:panelGroup>
            </h:form>        
        </ui:define>
    </ui:composition> 
</html>